<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>章节内容</title>
    <link rel="stylesheet" href="./css/fiction.css">
    <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
    <style>
        .arrows a:hover{
            cursor: pointer;
        }
    </style>
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <link rel="stylesheet" type="text/css" href="css/login-ajax.css">
    <script type="text/javascript" src="./js/clipboard.min.js"></script>
</head>
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>

<script>

    $.fn.toggle = function (fn) {
        // Save reference to arguments for access in closure
        var args = arguments,
            guid = fn.guid || jQuery.guid++,
            i = 0,
            toggler = function (event) {
                // Figure out which function to execute
                var lastToggle = (jQuery._data(this, "lastToggle" + fn.guid) || 0) % i;
                jQuery._data(this, "lastToggle" + fn.guid, lastToggle + 1);

                // Make sure that clicks stop
                event.preventDefault();

                // and execute the function
                return args[lastToggle].apply(this, arguments) || false;
            };

        // link all the functions, so any of them can unbind this click handler
        toggler.guid = guid;
        while (i < args.length) {
            args[i++].guid = guid;
        }

        return this.click(toggler);
    }
    $(function () {
        $('#fbg option').each(function () {
            $(this).css('background-color', $(this).val());
            if ($(this).text() == '漆黑') $(this).css('color', '#fff');
        });
        $('#ffamily').change(function () {
            // console.log($('#ffamily').val());
            $('.articles p').css('font-family', $('#ffamily').val());
        });
        $('#fcolor').change(function () {
            // console.log($('#ffamily').val());
            $('.articles p').css('color', $('#fcolor').val());
        });
        $('#fsize').change(function () {
            // console.log($('#ffamily').val());
            $('.articles p').css('font-size', $('#fsize').val());
        });
        $('#fbg').change(function () {
            // console.log($('#ffamily').val());
            $('body').css('background-color', $('#fbg').val());
        });
        $('#fwidth').change(function () {
            // console.log($('#ffamily').val());
            $('.articles p').css({'margin': 'auto', 'width': $('#fwidth').val()});
        });
        $('#nightmode').change(function () {
            console.log($(this).prop('checked'));
            if ($(this).prop('checked')) $('*').css({
                'background-color': 'rgb(17, 17, 17)',
                'color': 'rgb(147, 147, 146)'
            });
            else {

                $('*').removeAttr('style', "");
                $('body').css('background-color', $('#fbg').val());
                $('.articles p').css({
                    'margin': 'auto',
                    'width': $('#fwidth').val(),
                    'font-family': $('#ffamily').val(),
                    'color': $('#fcolor').val(),
                    'font-size': $('#fsize').val(),
                });
            }
        })
        $('#automove').change(function () {
            if ($(this).prop('checked'))
                $('body').animate({
                    scrollTop: $('.f_style').offset().top
                }, parseInt($('#fscroll').val()));
            else $('body').stop();
        });
        $('.articles p').toggle(
            function () {
                console.log("stop");
                $('body').stop(true);
                $('#automove').prop('checked', false);
            },
            function () {
                console.log("animate");
                $('body').animate({
                    scrollTop: $('.f_style').offset().top
                }, parseInt($('#fscroll').val()));
            });

        $('a[id^="shangpage"]').click(function () {

            var arr = new Array();
            arr = $(this).prop("id").split('&');
            var chid = arr[0].substring(9);
            var b_name2 = arr[1];
            $.ajax({
                url: "http://localhost:8080/mutilBook",
                type: "post",
                data: {
                    "ch_id1": chid,
                    "b_name2": b_name2,
                    "_method": "shangBookcontent"
                },
                success: function (result) {
                    if (result == "当前为第一章") {
                        alert(result);
                    } else {
                        var resp = eval(result);

                        window.location.href= "http://localhost:8080/mutilBook"+"?ch_id1="+resp.chid+"&b_name2="+resp.bname+"&_method=Bookcontent"

                    }
                }
            })
        });


        $('a[id^="xiapage"]').click(function () {

            var arr = new Array();
            arr = $(this).prop("id").split('&');
            var chid = arr[0].substring(7);
            var b_name2 = arr[1];

            $.ajax({
                url: "http://localhost:8080/mutilBook",
                type: "post",
                data: {
                    "ch_id1": chid,
                    "b_name2": b_name2,
                    "_method": "xiaBookcontent"
                },
                success: function (result) {
                    if (result == "当前为最后一章") {
                        alert(result);
                    } else {
                        console.log(result);
                        var resp = eval(result);

                        console.log(resp.chid);
                        window.location.href= "http://localhost:8080/mutilBook"+"?ch_id1="+resp.chid+"&b_name2="+resp.bname+"&_method=Bookcontent"
                    }
                }
            })
        });

    })


</script>

<body>
<!-- 头部开始 -->
<header class="header">
    <!-- 头部的div用来保证缩放可以正常进行 -->
    <div class="center">
        <div class="header-div">
            <div class="header-left-one">
                <!-- <img src="./images/all.gif" alt=""> -->
                <a class="btnCopy" data-clipboard-text="localhost:8080">将本站设为首页</a>
            </div>
            <div class="header-left-two">
                <a href="#">收藏新笔趣阁</a>
            </div>
            <div class="header-right">
                <c:if test="${empty username}">
                    <form action="/mutilAdmin" class="header-form" id="loginForm">
                        账号：<input type="text" name="username" id="username" class="username">
                        密码：<input type="password" name="password" id="password" class="password">
                        <input type="button" value="登录" id="submit">
                        <a href="register.jsp" class="registration">用户注册</a>
                        <a href="forgetpwd.jsp" class="registration">忘记密码</a>
                    </form>
                </c:if>
                <c:if test="${not empty username}">
                    <span id="ajax">hi,${username}&ensp;
                        <c:if test="${type==3}">超级管理员
                            <a href="/mutilAdmin?_method=selectAdmin" class="svip">超级管理员界面&ensp;|</a>
                        </c:if>
                        <c:if test="${type==2}">管理员
                            <a href="/mutilAdmin?_method=selectAdmin" class="vip">管理员界面&ensp;|</a>
                        </c:if>
                        <c:if test="${type==1}">尊敬的用户
                            <a href='/index.jsp' class='user'>回到首页&ensp;|</a>
                        </c:if>
                    </span>
                    <a href="/BookShelf?_method=myBookShelf">我的书架&ensp;|</a>
                    <a href="forgetpwd.jsp">修改密码&ensp;|</a>
                    <a class="exit">安全退出&ensp;|</a>
                </c:if>

            </div>
            <div class="clear"></div>
        </div>
    </div>
</header>
<!-- --------------------头部结束/整体开始 ----------------------->
<!-- 新笔趣阁图标一栏 -->
<div class="new-penguin center">
    <div id="new-penguin-div">
        <div class="image"><a href="index.jsp"><img src="./images/图标.jpg" alt=""></a></div>
        <div class="form-div">
            <form action="/mutilfind" class="form">
                <input type="search" class="search-box" name="u_username" placeholder="输入需要搜索的内容">
                <input type="hidden" name="_method" value="searchbyab">
                <input type="submit" value="搜索" class="submit-search">
            </form>
        </div>
        <div class="clear"></div>
    </div>
</div>
<!-- 标题 -->
<div class="title center">
    <div class="title-div">
        <!-- <a href="#">首页</a>
            <a href="#">永久书架</a>
            <a href="#">玄幻奇幻</a>
            <a href="#">武侠仙侠</a>
            <a href="#">都市言情</a>
            <a href="#">历史军事</a>
            <a href="#">科幻灵异</a>
            <a href="#">网游竞技</a>
            <a href="#">女频频道</a>
            <a href="#">完本小说</a>
            <a href="#">排行榜单</a>
            <a href="#">临时书架</a> -->
        <ul>
            <li><a href="index.jsp">首页</a></li>
            <li><a href="/BookShelf?_method=myBookShelf">永久书架</a></li>
            <li><a href="fantasy.jsp">玄幻奇幻</a></li>
            <li><a href="wxxx.jsp">武侠仙侠</a></li>
            <li><a href="romance.jsp">都市言情</a></li>
            <li><a href="historymilitary.jsp">历史军事</a></li>
            <li><a href="science.jsp">科幻灵异</a></li>
            <li><a href="olgame.jsp">网游竞技</a></li>
            <li><a href="femate.jsp">女频频道</a></li>
            <li><a href="mutilfind?_method=finishbook">完本小说</a></li>
            <li><a href="mutilBook?_method=topBook">排行榜单</a></li>
            <li><a href="/BookShelf?_method=tempBookShelf">临时书架</a></li>
        </ul>
    </div>
    <div class="clear"></div>
</div>
<!-- 标题结束 -->
<!---------------------------------主体内容开始---------------------------------- -->
<div class="fiction center">
    <div class="fiction-div">
        <!-- ----选择框一栏---------- -->
        <div class="fiction-top">
            <h3><a href="index.jsp">新笔趣阁</a> &gt; <a
                    href="/mutilfind?c_id=${book.c_id}&_method=findBookBycid">${cname}</a> &gt; <a
                    href="/mutilfind?b_name1=${book.b_name}&_method=bookdatil"
                    target="_blank">${book.b_name}</a> &gt; ${chname}</h3>
            <div class="select">
                <select name="字体" id="ffamily">
                    <option value="方正启体简体">字体</option>
                    <option value="方正启体简体">默认</option>
                    <option value="黑体">黑体</option>
                    <option value="楷体">楷体</option>
                    <option value="雅黑">雅黑</option>
                    <option value="启体">启体</option>
                    <option value="宋体">宋体</option>
                </select>
                <select name="颜色" id="fcolor">
                    <option value="black">颜色</option>
                    <option value="black">默认</option>
                    <option value="rgb(147, 112, 219)">暗紫</option>
                    <option value="rgb(46, 139, 87)">藻绿</option>
                    <option value="rgb(47, 79, 79)">深灰</option>
                    <option value="rgb(119, 136, 153)">清灰</option>
                    <option value="rgb(128, 0, 0)">栗色</option>
                    <option value="rgb(106, 90, 205)">青褐</option>
                    <option value="rgb(188, 143, 143)">玫褐</option>
                    <option value="rgb(244, 164, 96)">黄褐</option>
                    <option value="rgb(245, 245, 220)">米色</option>
                    <option value="rgb(245, 245, 245)">雾白</option>
                </select>
                <select name="大小" id="fsize">
                    <option value="19pt">大小</option>
                    <option value="19pt">默认</option>
                    <option value="10pt">10pt</option>
                    <option value="12pt">12pt</option>
                    <option value="14pt">14pt</option>
                    <option value="16pt">16pt</option>
                    <option value="18pt">18pt</option>
                    <option value="10pt">10pt</option>
                    <option value="22pt">22pt</option>
                    <option value="25pt">25pt</option>
                    <option value="30pt">30pt</option>
                </select>
                <select name="滚屏" id="fscroll">
                    <option value="80000">滚屏</option>
                    <option value="120000">最慢</option>
                    <option value="100000">慢2</option>
                    <option value="90000">慢3</option>
                    <option value="80000">中4</option>
                    <option value="70000">中5</option>
                    <option value="60000">中6</option>
                    <option value="50000">快7</option>
                    <option value="48000">快8</option>
                    <option value="45000">快9</option>
                    <option value="40000">最快</option>
                </select>
                <select name="背景" id="fbg">
                    <option value="#E9FAFF">背景</option>
                    <option value="#E9FAFF">默认</option>
                    <option value="rgb(255, 255, 255)">白雪</option>
                    <option value="rgb(0, 0, 0)">漆黑</option>
                    <option value="rgb(255, 255, 237)">明黄</option>
                    <option value="rgb(238, 250, 238)">淡绿</option>
                    <option value="rgb(204, 232, 207)">草绿</option>
                    <option value="rgb(252, 239, 255)">红粉</option>
                    <option value="rgb(239, 239, 239)">深灰</option>
                    <option value="rgb(245, 245, 220)">米色</option>
                    <option value="rgb(210, 180, 140)">茶色</option>
                    <option value="rgb(192, 192, 192)">银色</option>
                </select>
                <select name="宽度" id="fwidth">
                    <option value="85%">宽度</option>
                    <option value="85%">默认</option>
                    <option value="85%">85%</option>
                    <option value="75%">75%</option>
                    <option value="65%">65%</option>
                    <option value="50%">50%</option>
                    <option value="40%">40%</option>
                </select>
                自动滚动<input type="checkbox" id="automove">
                夜间<input type="checkbox" id="nightmode">
            </div>
        </div>
        <!----------------------------------- 选择一栏结束------------------------ -->
        <div class="fiction-introduction center">
            <div class="fiction-introduction-div">
                <h2>${chname}</h2>
                <div class="arrows">
                    <input type="hidden" name="ch_id1" value="${chid}">
                    <a id="shangpage${chid}&${book.b_name}">上一章</a>
                    ← <a href="/mutilfind?b_name1=${book.b_name}&_method=bookdatil" target="_blank">章节列表</a> →
                    <a id="xiapage${chid}&${book.b_name}" >下一章</a>
                    <a href="#" target="_blank">加入书签</a>
                </div>
                <div class="read">
                    <p>
                    <h6>推荐阅读:</h6>
                    <a href="#" target="_blank">大主宰</a>
                    <a href="#" target="_blank">武炼巅峰</a>
                    <a href="#" target="_blank">超品相师</a>
                    <a href="#" target="_blank">择天记</a>
                    <a href="#" target="_blank">我真是大明星</a>
                    <a href="#" target="_blank">帝霸</a>
                    <a href="#" target="_blank">太古神王</a>
                    <a href="#" target="_blank">雪鹰领主</a>
                    <a href="#" target="_blank">玄界之门</a>
                    <a href="#" target="_blank">龙王传说</a>
                    <a href="#" target="_blank">斗战狂潮</a>
                    <a href="#" target="_blank">天影</a>
                    <a href="#" target="_blank">美食供应商</a>
                    <a href="#" target="_blank">圣墟</a>
                    </p>
                </div>
            </div>
        </div>
        <!-- --------------------介绍内容结束------------ -->
        <!-- -------------------正文开始------------------- -->
        <div class="articles">
            <p>${con}</p>
        </div>
    </div>
</div>
<!-- --------------------------主体内容结束-------------------------------- -->
<!-- ----------------------------尾部开始-------------------------- -->
<tfoot>
<div class="center f_style">
    <div class="f_firp">
        <p>
        <h6>新书推荐:</h6>
        <a href="#" target="_blank">大主宰</a>
        <a href="#" target="_blank">武炼巅峰</a>
        <a href="#" target="_blank">超品相师</a>
        <a href="#" target="_blank">择天记</a>
        <a href="#" target="_blank">我真是大明星</a>
        <a href="#" target="_blank">帝霸</a>
        <a href="#" target="_blank">太古神王</a>
        <a href="#" target="_blank">雪鹰领主</a>
        <a href="#" target="_blank">玄界之门</a>
        <a href="#" target="_blank">龙王传说</a>
        <a href="#" target="_blank">斗战狂潮</a>
        <a href="#" target="_blank">天影</a>
        <a href="#" target="_blank">美食供应商</a>
        <a href="#" target="_blank">圣墟</a>
        </p>
    </div>
    <hr/>
    <div class="f_last">
        <p>《万古神帝（万古神帝张若尘）》情节跌宕起伏、扣人心弦，是一本情节与文笔俱佳的都市小说，新笔趣阁转载收集万古神帝（万古神帝张若尘）最新章节。</p>
        <p>本站所有小说为转载作品，所有章节均由网友上传，转载至本站只是为了宣传本书让更多读者欣赏。</p>
        <p>Copyright &copy; 2015&nbsp;新笔趣阁&nbsp;All Right Reserved.</p>
    </div>
</div>
</tfoot>
</body>


</html>